package cn.myframe.entity.sys;

import com.baomidou.mybatisplus.toolkit.StringUtils;

/**
 * 列的属性
 * 
 * @author chenshun
 * @email sunlightcs@gmail.com
 * @date 2016年12月20日 上午12:01:45
 */
public class ColumnEntity {
	//列名
    private String columnName;
    //列名类型
    private String dataType;
    //列名备注
    private String comments;
    
    //属性名称(第一个字母大写)，如：user_name => UserName
    private String attrName;
    //属性名称(第一个字母小写)，如：user_name => userName
    private String attrname;
    //属性类型
    private String attrType;
    //auto_increment
    private String extra;
    //字段长度
    private String dataLength;
    //是否可为空
    private String nullAble;
    //缺省值
    private String defaultValue;
    //是否生成查询条件
    private String search;
    //编辑项
    private String editType;
    //是否生成列表项
    private String displayList;
    //是否生显示名
    private String displayName;
    //是否校验
    private String vaild;
    //最小值
    private String min;
    //最大值
    private String max;
    //正常表达式
    private String regex;
    //关联表实体对象名
    private String assClassName;
    //关联表实体对象名
    private String assclassname;
    //关联表实体对象的主键属性名
    private String assId;
    
    private String assAttrId;
    //关联表实体对象的名称属性名  如：user_name => UserName
    private String assName;
    //关联表实体对象的名称属性名  如：user_name => userName
    private String assname;
    
    private String assTablePrefix;
    
    private String assComments;
    
    private String assTableId;
    
    private String assTableName;
    
    private String midClassName;
    
    private String midclassname;
    
    private String midTablePrefix;
    
    private String midAssTable;
    
    private String assBaseData;
    
	public String getColumnName() {
		return columnName;
	}
	public void setColumnName(String columnName) {
		this.columnName = columnName;
	}
	public String getDataType() {
		return dataType;
	}
	public void setDataType(String dataType) {
		this.dataType = dataType;
	}
	public String getComments() {
        if(StringUtils.isEmpty(this.comments)){
			return " ";
		}
		return comments;
	}
	public void setComments(String comments) {
		this.comments = comments;
	}
	public String getAttrname() {
		return attrname;
	}
	public void setAttrname(String attrname) {
		this.attrname = attrname;
	}
	public String getAttrName() {
		return attrName;
	}
	public void setAttrName(String attrName) {
		this.attrName = attrName;
	}
	public String getAttrType() {
		return attrType;
	}
	public void setAttrType(String attrType) {
		this.attrType = attrType;
	}
	public String getExtra() {
		return extra;
	}
	public void setExtra(String extra) {
		this.extra = extra;
	}
	public String getDataLength() {
		if(StringUtils.isNotEmpty(dataType) && "NUMBER".equals(dataType)){
			return String.valueOf(Integer.parseInt(dataLength)-2);
		}
		return dataLength;
	}
	public void setDataLength(String dataLength) {
		this.dataLength = dataLength;
	}
	public String getNullAble() {
		return nullAble;
	}
	public void setNullAble(String nullAble) {
		this.nullAble = nullAble;
	}
	public String getDefaultValue() {
		return defaultValue;
	}
	public void setDefaultValue(String defaultValue) {
		this.defaultValue = defaultValue;
	}
	public String getSearch() {
		return search;
	}
	public void setSearch(String search) {
		this.search = search;
	}
	public String getEditType() {
		return editType;
	}
	public void setEditType(String editType) {
		this.editType = editType;
	}
	public String getDisplayList() {
		return displayList;
	}
	public void setDisplayList(String displayList) {
		this.displayList = displayList;
	}
	public String getDisplayName() {
		return displayName;
	}
	public void setDisplayName(String displayName) {
		this.displayName = displayName;
	}
	public String getVaild() {
		return vaild;
	}
	public void setVaild(String vaild) {
		this.vaild = vaild;
	}
	public String getMin() {
		return min;
	}
	public void setMin(String min) {
		this.min = min;
	}
	public String getMax() {
		return max;
	}
	public void setMax(String max) {
		this.max = max;
	}
	public String getRegex() {
		return regex;
	}
	public void setRegex(String regex) {
		this.regex = regex;
	}
	public String getAssClassName() {
		return assClassName;
	}
	public void setAssClassName(String assClassName) {
		this.assClassName = assClassName;
	}
	public String getAssId() {
		return assId;
	}
	public void setAssId(String assId) {
		this.assId = assId;
	}
	public String getAssName() {
		return assName;
	}
	public void setAssName(String assName) {
		this.assName = assName;
	}
	public String getAssname() {
		return assname;
	}
	public void setAssname(String assname) {
		this.assname = assname;
	}
	public String getAssclassname() {
		return assclassname;
	}
	public void setAssclassname(String assclassname) {
		this.assclassname = assclassname;
	}
	public String getAssComments() {
		return assComments;
	}
	public void setAssComments(String assComments) {
		this.assComments = assComments;
	}
	public String getAssTablePrefix() {
		return assTablePrefix;
	}
	public void setAssTablePrefix(String assTablePrefix) {
		this.assTablePrefix = assTablePrefix;
	}
	public String getMidClassName() {
		return midClassName;
	}
	public void setMidClassName(String midClassName) {
		this.midClassName = midClassName;
	}
	public String getMidclassname() {
		return midclassname;
	}
	public void setMidclassname(String midclassname) {
		this.midclassname = midclassname;
	}
	public String getMidTablePrefix() {
		return midTablePrefix;
	}
	public void setMidTablePrefix(String midTablePrefix) {
		this.midTablePrefix = midTablePrefix;
	}
	public String getAssTableId() {
		return assTableId;
	}
	public void setAssTableId(String assTableId) {
		this.assTableId = assTableId;
	}
	public String getAssTableName() {
		return assTableName;
	}
	public void setAssTableName(String assTableName) {
		this.assTableName = assTableName;
	}
	public String getAssAttrId() {
		return assAttrId;
	}
	public void setAssAttrId(String assAttrId) {
		this.assAttrId = assAttrId;
	}
	public String getAssBaseData() {
		return assBaseData;
	}
	public void setAssBaseData(String assBaseData) {
		this.assBaseData = assBaseData;
	}
	public String getMidAssTable() {
		return midAssTable;
	}
	public void setMidAssTable(String midAssTable) {
		this.midAssTable = midAssTable;
	}
	

	
	
	
	
	
	
}
